<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Users.aspx.cs" Inherits="Impact.Web.Admin.Users" EnableEventValidation="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <asp:Repeater ID="_userList" runat="server" OnItemCommand="UserList_ItemCommand" OnItemDataBound="UserList_ItemDataBound">
        <HeaderTemplate>
            <table class="AdminTable">
                <tr>
                    <th>Users:</th>
                    <th></th>
                    <th class="NonHeader">Last Login</th>
                    <th class="NonHeader">Delete</th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td style="text-align: left; width: 370px; padding-left: 30px;"><a href="EditUser.aspx?username=<%# Eval("UserName") %>"><%# Eval("UserName") %></a></td>
                <td style="text-align: center;"><asp:ImageButton ID="passwordButton" ImageUrl="images/key.png" CommandName="password" CommandArgument='<%# Eval("ProviderUserKey") %>' runat="server" /></td>
                <td style="text-align: center;">
                    <%# ((DateTime)Eval("LastLoginDate")).ToString("MMM d, H:mm") %>
                </td>
                <td style="text-align: center;">
                    <asp:ImageButton id="deleteUser" ImageUrl="images/red-x.png" runat="server" 
                        CommandName="delete" CommandArgument='<%# Eval("UserName") %>' />
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
                <tr>
                    <td colspan="4" style="text-align: right;">
                        <impact:ImageLinkButton ID="newUserButton" CssClass="AdminTableButton" runat="server"
                            ImageUrl="images/add.png" Text="Create New User" TargetUrl="EditUser.aspx" />

                    </td>
                </tr>
            </table>
        </FooterTemplate>
    </asp:Repeater>


</asp:Content>
